<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
          <a><cite>首页</cite></a>
          <a><cite>会员管理</cite></a>
          <a><cite>会员删除</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
        <xblock><button class="layui-btn layui-btn-danger" onclick="recoverAll()"><i class="layui-icon">&#xe640;</i>批量恢复</button><span class="x-right" style="line-height:40px">共有数据：{:count($del_list)} 条</span></xblock>
        <table class="layui-table">
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" name="select-all" value="" id="select-all">
                    </th>
                    <th>
                        ID
                    </th>
                    <th>
                        用户名
                    </th>
                    <th>
                        性别
                    </th>
                    <th>
                        手机
                    </th>
                    <th>
                        邮箱
                    </th>
                    <th>
                        地址
                    </th>
                    <th>
                        加入时间
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
            </thead>
            <tbody id="x-link">
                <?php foreach ($del_list as $dlv) { ?>
                    <tr>
                        <td>
                            <input type="checkbox" value="" name="selected" class="selected">
                        </td>
                        <td>
                            <?php echo $dlv['uid']; ?>
                        </td>
                        <td>
                            <u style="cursor:pointer" onclick="member_show('<?php echo $dlv['uname']; ?>','{:U('admin/member/member_show',array('uid'=>$dlv['uid']))}','460','450')">
                                <?php echo $dlv['uname']; ?>
                            </u>
                        </td>
                        <td >
                            <?php echo $dlv['sex']; ?>
                        </td>
                        <td >
                            <?php echo $dlv['email']; ?>
                        </td>
                        <td >
                            <?php if ($dlv['act_email'] == 1) {
                                echo "已激活";
                            } else {
                                echo "未激活";
                            } ?>
                        </td>
                        <td >
                            <?php echo $dlv['city']; ?>
                        </td>
                        <td>
                            <?php echo timeFormat($dlv['login_time']); ?>
                        </td>
                        <td class="td-status">
                            <span class="layui-btn layui-btn-danger layui-btn-mini">
                                已删除
                            </span>
                        </td>
                        <td class="td-manage">
                            <a style="text-decoration:none" onclick="member_recover(this,'{$dlv['uid']}')" href="javascript:;" title="恢复">
                                <i class="layui-icon">&#xe618;</i>
                            </a>
                            <a title="彻底删除" href="javascript:;" onclick="member_unset(this,'{$dlv['uid']}')" 
                            style="text-decoration:none">
                                <i class="layui-icon">&#xe640;</i>
                            </a>
                        </td>
                    </tr>
               <?php } ?>
            </tbody>
        </table>
    </div>
    <script>
        layui.use(['laydate','element','layer'], function(){
            $ = layui.jquery;//jquery
          laydate = layui.laydate;//日期插件
          lement = layui.element();//面包导航
          layer = layui.layer;//弹出层

          //以上模块根据需要引入
          
        });
        /*用户-查看*/
        function member_show(title,url,w,h){
            x_admin_show(title,url,w,h);
        }

        //批量恢复提交
         function recoverAll () {
            layer.confirm('确认要批量恢复吗？',function(index){
                //捉到所有被选中的，发异步进行恢复
                layer.msg('恢复成功', {icon: 1});
            });
         }

        /*用户-恢复*/
        function member_recover(obj,id){
            layer.confirm('确认要恢复吗？',function(index){
                //发异步删除数据
                $(obj).parents("tr").remove();
                layer.msg('已恢复!',{icon:1,time:1000});
            });
        }
        /*用户-彻底删除*/
        function member_unset(obj,id){
            layer.confirm('彻底删除无法恢复，确认要删除数据吗？',function(index){
                //发异步删除数据
                $(obj).parents("tr").remove();
                layer.msg('已彻底删除',{icon:1,time:1000});
            });
        }
    </script>
</body>